from multiprocessing import Process

'''
自定义进程
'''


class MyProcess(Process):

    def __init__(self, name):
        super(MyProcess, self).__init__(name=name)

    def run(self):
        n = 1
        while True:
            print('{}->自定义进程,n:{}'.format(self.name, n))
            n += 1


if __name__ == '__main__':
    p = MyProcess('自定义进程1')
    p.start()
